// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.statement.SQLRollbackStatement;
// import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerStatement;
// import com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;
#include "SQLServerRollbackStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../visitor/SQLServerASTVisitor.h"
#include "../../../../visitor/SQLASTVisitor.h"
#include "../../../../../utils/instanceof.h"

BOOL_ptr SQLServerRollbackStatement::isWork()
{
  return work;
}

void SQLServerRollbackStatement::setWork(BOOL_ptr work)
{
  this->work = work;
}

// @Override
void SQLServerRollbackStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (instanceof <SQLASTVisitor, SQLServerASTVisitor>(visitor))
  {
    accept0(std::dynamic_pointer_cast<SQLServerASTVisitor>(visitor));
  }
  else
  {
    SQLRollbackStatement::accept0(visitor);
  }
}

void SQLServerRollbackStatement::accept0(SQLServerASTVisitor_ptr visitor)
{
  visitor->visit(SharedObject(SQLServerRollbackStatement));
  visitor->endVisit(SharedObject(SQLServerRollbackStatement));
}

SQLExpr_ptr SQLServerRollbackStatement::getName()
{
  return name;
}

void SQLServerRollbackStatement::setName(SQLExpr_ptr name)
{
  this->name = name;
}
